package qf;

import com.qf.pojo.IdCard;
import com.qf.pojo.User;
import com.qf.service.UserService;
import com.qf.service.impl.UserServiceImpl;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Create by 周志豪 on 2022/8/26  17:30
 *
 * @authoe 周志豪
 * @veision 1.0
 * //TODO  想好了再去做
 * @since 1.0
 */
public class test01 {

    @Test
    public void testDi(){
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext2.xml");

        UserService bean = (UserServiceImpl) context.getBean(UserService.class);

        bean.adduser();
    }

    @Test
    public void testIdCard(){
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("applicationContext2.xml");

        IdCard bean = (IdCard) context.getBean(IdCard.class);

        System.out.println(bean);

    }

}
